<?php namespace App\Admin\Access\Role\Listeners;

use App\Core\Service\Listeners\UpdateListener as Base;

class UpdateListener extends Base {
    
    public function onUpdateGeneratedFeilds(){
        //不允许修改父角色
        foreach ($this->service->updateFields as $key => $value){
            if($value == 'parent_id'){
                unset($this->service->updateFields[$key]);
            }
        }
    }
}